//
//  AmendViewController.m
//  WE
//
//  Created by apple on 15/12/1.
//  Copyright © 2015年 UNOHACHA. All rights reserved.
//

#import "AmendViewController.h"
#import "Size.h"
#import "ToolUtil.h"

@interface AmendViewController ()
@property (nonatomic, strong)UITextField *oldWord;
@property (nonatomic, strong)UITextField *nPassWord;

@end

@implementation AmendViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"修改密码";
    self.view.backgroundColor = [UIColor colorWithRed:229/255. green:229/255. blue:229/255. alpha:1.0];
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0,64, WindowWidth, 100)];
    view.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:view];
    UILabel *oldLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 80, 50)];
    oldLabel.text = @"旧密码";
    oldLabel.textAlignment = NSTextAlignmentCenter;
    oldLabel.textColor = [UIColor blackColor];
    oldLabel.backgroundColor = [UIColor whiteColor];
    [view addSubview:oldLabel];
    self.oldWord = [[UITextField alloc] initWithFrame:CGRectMake(81, 10, WindowWidth- 90, 30)];
    self.oldWord.placeholder = @"原密码";
    [view addSubview:self.oldWord];
    [ToolUtil createLine:49 superView:view lift:0 width:WindowWidth hight:1 color:[UIColor grayColor]];
    UILabel *nLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 50, 80, 50)];
    nLabel.text = @"新密码";
    nLabel.textAlignment = NSTextAlignmentCenter;
    nLabel.textColor = [UIColor blackColor];
    nLabel.backgroundColor = [UIColor whiteColor];
    [view addSubview:nLabel];
    self.nPassWord = [[UITextField alloc] initWithFrame:CGRectMake(81, 60, WindowWidth- 90, 30)];
    self.nPassWord.placeholder = @"新密码";
    [view addSubview:self.nPassWord];
    
    UIButton *lButton = [UIButton buttonWithType:UIButtonTypeCustom];
    lButton.frame = CGRectMake(15*Width, 200, 345*Width, 40*Height);
    [lButton setTitle:@"确认修改" forState:UIControlStateNormal];
    [lButton addTarget:self action:@selector(pressLoginButton) forControlEvents:UIControlEventTouchUpInside];
    lButton.backgroundColor = [UIColor blueColor];
    [lButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.view addSubview:lButton];
    
}

- (void)pressLoginButton{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
